package com.hhh.springai_test.model.dto.bookborrow;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
public class BookBorrowAddRequest implements Serializable {
    
    /**
     * 图书ID
     */
    @NotNull(message = "图书ID不能为空")
    private Long bookid;

    /**
     * 图书名称
     */
    @NotBlank(message = "图书名称不能为空")
    private String bookname;

    /**
     * 借阅时间
     */
    @NotNull(message = "借阅时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date borrowtime;

    /**
     * 归还时间
     */
    @NotNull(message = "归还时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date returntime;

    private static final long serialVersionUID = 1L;
} 